package ${model.packageName}.service;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Component;

import ${model.packageName}.model.${model.initUpperName}Model;
import ${model.packageName}.dao.${model.initUpperName}Dao;

import io.terminus.common.model.Paging;
import lombok.RequiredArgsConstructor;

@Component
@RequiredArgsConstructor
public class ${model.initUpperName}ReadService {

	private final ${model.initUpperName}Dao ${model.initLowerName}Dao;
	/**
	 * 查询${model.desc}
	 */
	public ${model.initUpperName}Model view${model.initUpperName}(${model.initUpperName}Model model) {
		return ${model.initLowerName}Dao.view${model.initUpperName}(model);
	}
	/**
	 * 查询${model.desc}列表
	 */
	public List<${model.initUpperName}Model> list${model.initUpperName}(${model.initUpperName}Model model) {
		return ${model.initLowerName}Dao.list${model.initUpperName}(model);
	}
	/**
	 * 分页查询${model.desc}列表
	 */
	public Paging<${model.initUpperName}Model> page${model.initUpperName}(Map<String, Object> params, Integer offset, Integer limit) {
		return ${model.initLowerName}Dao.page${model.initUpperName}(params, offset, limit);
	}
}
